<template>
    <CommonModal :isVisible="isVisible" :backgroundImage="modal6Png" @close="closeModal"
        :modalStyle="{ width: '1440px', height: '800px', minWidth: '1440px' }">
        <template #content>
            <div class="score-text">
                <span>{{ completeScore }}</span>
                <span style="font: 110px">分</span>
            </div>
        </template>

        <template #buttons>
            <div class="back-btn" @click="closeModal"></div>
        </template>
    </CommonModal>
</template>

<script setup>
import { ref, defineEmits } from 'vue'
import CommonModal from './CommonModal.vue'
import modal6Png from '@/assets/images/6/modal.png'

const props = defineProps({
    isVisible: {
        type: Boolean,
        default: false
    },
    completeScore: {
        type: Number,
        default: 0
    },
})
const emit = defineEmits(['close', 'complete'])

const closeModal = () => {
    emit('close')
    emit('complete')
}
</script>

<style lang="scss" scoped>
.score-text {
    font-size: 120px;
    background: #FF0000;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    top: 54%;
    left: 52%;
    transform: translate(-50%, -50%);
    -webkit-text-stroke: 4px #FF0000;
    filter: drop-shadow(0 0 0 #fff) drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(1px 1px 0 #fff) drop-shadow(-1px -1px 0 #fff) drop-shadow(1px -1px 0 #fff) drop-shadow(-1px 1px 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff);
}

// 登录按钮
.back-btn {
    position: absolute;
    bottom: 84px;
    left: 53%;
    transform: translateX(-50%);
    width: 100%;
    height: 96px;
    background: url('../assets/images/6/back.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background-image: url('../assets/images/6/back_active.png');
        transform: translateX(-50%) scale(1.05);
    }

    &:active {
        transform: translateX(-50%) scale(0.95);
    }
}
</style>